﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.DAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;

namespace KPIS.GERP.GIMS.BLL
{
    public class BidCommitteeBLL
    {
        private static readonly BidCommitteeDAL dal = DataAccess.CreateBidCommittee();

        public BidCommitteeInfo GetBidCommittee(int seq)
        {
            return dal.GetBidCommittee(seq);
        }

        public IList<BidCommitteeInfo> GetBidCommitteeWithParent(int bid_seq)
        {
            return dal.GetBidCommitteeWithParent(bid_seq);
        }

        public void Insert(BidCommitteeInfo info)
        {
            try
            {
                dal.Insert(info);
            }
            catch
            {
                throw;
            }
        }

        public void Insert(IList<PurchaseRequestCommitteeInfo> infoList, int bid_seq, IDBManager dbManagerTrans)
        {
            try
            {
                dal.Insert(infoList, bid_seq, dbManagerTrans);
            }
            catch
            {
                throw;
            }
        }

        public void Update(BidCommitteeInfo info)
        {
            try
            {
                dal.Update(info);
            }
            catch
            {
                throw;
            }
        }

        public void Delete(BidCommitteeInfo info)
        {
            try
            {
                dal.Delete(info);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteAll(IList<BidCommitteeInfo> infoList)
        {
            try
            {
                dal.DeleteAll(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void DeleteFromDB(IList<BidCommitteeInfo> infoList)
        {
            try
            {
                dal.DeleteFromDB(infoList);
            }
            catch
            {
                throw;
            }
        }

        public void Restore(IList<BidCommitteeInfo> infoList)
        {
            try
            {
                dal.Restore(infoList);
            }
            catch
            {
                throw;
            }
        }
    }
}
